<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class CreateAdminRoleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_role', function (Blueprint $table) {
            $table->id("role_id")->comment("角色id");
            $table->string("role_name")->comment("角色名称");
            $table->text("act_list")->comment("权限列表")->nullable();
            $table->string("role_desc")->comment("描述")->nullable();
        });
        DB::statement("ALTER TABLE `admin_role` comment'tp用后台管理员角色表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_role');
    }
}
